package com.woniuxy.enjoylife.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.enjoylife.entity.Activity_comment;
import com.woniuxy.enjoylife.entity.dto.*;
import com.woniuxy.enjoylife.entity.dto.ActivityCommentUserDto;
import com.woniuxy.enjoylife.utils.PageResult;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ActivityCommentMapper extends BaseMapper<Activity_comment> {

    //查询所有评论
    List<Activity_comment> selectAllComment(int uid);

    //查询当前活动有关的所有评论
    List<Activity_comment> selectComment(int aid);

    //新增
    int addActivityComment(Activity_comment activityComment);

    //修改
    int updateActivityComment(Activity_comment activityComment);

    //删除
    int deleteActivityComment(int id);

    //平台查询所有活动评论及其发表人
    public List<ActivityAndActivityCommentUserDto> findAllActivityCommentAndUser();
    //平台模糊查询所有人的评论
    public List<ActivityAndActivityCommentUserDto> findLikeAllAndUser(String content);



    //******************用户活动对应评论******************

    //查询活动对应的评论
    public List<ActivityCommentAndUserDto> findActivityComment(Integer id);


    public List<ActivityCommentAndUserDto> findActivityCommentAndReply(Integer id);


//    活动详情功能

//    public List<ActivityCommentAndUserDto> eventdetails(Integer id);

}
